//
//  HHLTableRowView.m
//  HMusicPlayer
//
//  Created by Hament on 14/9/19.
//  Copyright (c) 2014年 HJ. All rights reserved.
//

#import "HHLTableRowView.h"
#import "HCoreConfig.h"
#import "HskinManager.h"



@implementation HHLTableRowView

- (void)drawRect:(NSRect)dirtyRect {
    [super drawRect:dirtyRect];
    
    // Drawing code here.
}






//选择后的row的背景颜色
- (void)drawSelectionInRect:(NSRect)dirtyRect {
    // Check the selectionHighlightStyle, in case it was set to None
    if (self.selectionHighlightStyle != NSTableViewSelectionHighlightStyleNone) {
        
        CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
        [[HCoreConfig shareConfig].currentSkinManager.rightListCellHighlightBGColor setFill];
        CGContextFillRect(context, NSRectToCGRect(dirtyRect));
        
        //        NSRect selectionRect = NSInsetRect(self.bounds, 0, 0);
        //        [[NSColor colorWithCalibratedRed: 35.0/255.0 green:183.0/255.0 blue:230.0/255.0 alpha:1.0] setFill];
        //        NSBezierPath *selectionPath = [NSBezierPath bezierPathWithRoundedRect:selectionRect xRadius:5 yRadius:5];
        //        [selectionPath fill];
    }
}



- (void)drawBackgroundInRect:(NSRect)dirtyRect {
    // Custom background drawing. We don't call super at all.
    //

//    //绘制颜色
//    CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
//    CGContextSetRGBFillColor(context, 125.0/255.0,235.0/255.0,235.0/255.0,1.0);
//    CGContextFillRect(context, NSRectToCGRect(dirtyRect));

}



- (NSBackgroundStyle)interiorBackgroundStyle {
    return NSBackgroundStyleLight;
}

@end
